<?php
/**
 * 重置密码
 * User: tengyu
 * Date: 2017/8/29
 * Time: 14:35
 */?>
@extends('common.common')
@section('title','密码重置')
@section('css')<link rel="stylesheet" href="{{asset('/css/reset_pwd.css')}}">@endsection
@section('content')
    <div id="content">
        <div class="container">
            <div class="loginBox">
                <p class="register"><h3>重置密码</h3></p>
                <!--表单-->
                <form class="form-horizontal" action="{{asset('/storepw')}}" method="post" onsubmit="return resetpw_check()">
                    {!! csrf_field() !!}
                    <!--密码-->
                        <input type="hidden" name="phone" value="{{$param['user']['phone']}}">
                    <div class="form-group loginpwd special">
                        <input class="form-control" type="password" name="password" value="" placeholder="请输入密码">
                        <b></b>
                        <i></i>
                    </div>
                    <!--确认密码-->
                    <div class="form-group loginpwd special">
                        <input class="form-control" type="password" name="enpassword" value="" placeholder="确认密码">
                        <b></b>
                        <i></i>
                    </div>
                    <div class="form-group">
                        <input class="btn btn-warning btn-block" type="submit" value="确认重置">
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script>
        /**校验两次密码一致性*/
        function resetpw_check(){
            var pw = $("input[name='password']").val();
            var enpw = $("input[name='enpassword']").val();
            if(pw != enpw){
                alert('两次密码不一致');
            }
            return true;
        }
    </script>
@endsection
